package com.syntaxtree.trees;

import com.syntaxtree.constant.Other;

public class BaseTree {
	public String Code;
	public BaseTree(String code) {
		if (code == null)
			throw new NullPointerException("java.lang.String类型的参数不能为null");
		if (code.isEmpty() || code.replaceAll("\s+", Other.Empty).isEmpty())
			throw new IllegalArgumentException(String.format("参数(%s)不能为空串", code));
		this.Code = code.trim().replaceAll("\s+", " ");
	}
}
